package com.truyen.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.truyen.persistence.dao.LoaiLogDao;
import com.truyen.persistence.entity.LoaiLog;
import com.truyen.service.LoaiLogService;
import com.truyen.utils.PagingInfo;


@Service
public class LoaiLogServiceImpl implements LoaiLogService {
	
	@Autowired
	private LoaiLogDao loaiLogDao;

	@Override
	public void save(LoaiLog entity) {
		loaiLogDao.save(entity);
	}

	@Override
	public LoaiLog findById(Long id) {
		return loaiLogDao.findById(id);
	}

	@Override
	public List<LoaiLog> getAll() {
		return loaiLogDao.findAll();
	}

	@Override
	public LoaiLog findByProperty(String column, Object value) {
		List<LoaiLog> lst = loaiLogDao.findByProperty(column, value);
		return (lst.size()>0)?lst.get(0):null;
	}

	@Override
	public List<LoaiLog> getAllLst(String kwSearch, String sort, String sortBy,
			PagingInfo pInfo) {
		return loaiLogDao.getAllLst(kwSearch,sort,sortBy,pInfo);
	}


}
